window.onload=function(){
    if(sessionStorage.getItem("username")!=null){
        $("#login_div").css("display","none");
        $("#exit_div").css("display","block");
    }
};

function toLogin() {
    let href=window.location.href;
    sessionStorage.setItem("href",href);
    return window.location.href="login.html";
}

function toRegister() {
    return window.location.href="register.html";
}

function toEsc() {
    sessionStorage.clear();
    $("#login_div").css("display","block");
    $("#exit_div").css("display","none");
}